home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- branch ;
- access ;
- symbols sprited:1.2.1;
- locks ; strict;
- comment @ * @;
-
-
- 1.2
- date 88.07.29.17.39.25; author ouster; state Exp;
- branches 1.2.1.1;
- next 1.1;
-
- 1.1
- date 88.06.19.14.31.18; author ouster; state Exp;
- branches ;
- next ;
-
- 1.2.1.1
- date 91.12.10.15.46.49; author kupfer; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.2
- log
- @Lint.
- @
- text
- @/*
- * fork.c --
- *
- * Procedure to map from Unix fork system call to Sprite.
- *
- * Copyright (C) 1986 Regents of the University of California
- * All rights reserved.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: fork.c,v 1.1 88/06/19 14:31:18 ouster Exp $ SPRITE (Berkeley)";
- #endif not lint
-
- #include "sprite.h"
- #include "status.h"
- #include "proc.h"
-
- #include "compatInt.h"
-
-
- /*
- *----------------------------------------------------------------------
- *
- * fork --
- *
- * Procedure to map from Unix fork system call to Sprite Proc_Fork.
- *
- * Results:
- * UNIX_ERROR is returned upon error, with the actual error code
- * stored in errno. Upon success, the value of pid is returned,
- * where pid is different for child and parent. The parent receives
- * the process id of the child in pid, and the child receives the
- * value 0.
- *
- * Side effects:
- * A new process is created.
- *
- *----------------------------------------------------------------------
- */
-
- int
- fork()
- {
- ReturnStatus status; /* result returned by Proc_Fork */
- int pid; /* process id of child, or 0, set by Proc_Fork */
-
- /* Fork without sharing the heap. */
- status = Proc_Fork(FALSE, &pid);
- if (status == PROC_CHILD_PROC) {
- return(0);
- }
- if (status != SUCCESS) {
- errno = Compat_MapCode(status);
- return(UNIX_ERROR);
- }
- return((int) pid);
- }
- @
-
-
- 1.2.1.1
- log
- @Initial branch for Sprite server.
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: /sprite/src/lib/c/unixSyscall/RCS/fork.c,v 1.2 88/07/29 17:39:25 ouster Exp $ SPRITE (Berkeley)";
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: fork.c,v 1.3 86/07/07 15:10:55 douglis Exp $ SPRITE (Berkeley)";
- d45 1
- a45 1
- Proc_PID pid; /* process id of child, or 0, set by Proc_Fork */
- @
-